﻿using FutureApp.EntityFramework;
using EntityFramework.DynamicFilters;

namespace FutureApp.Migrations.SeedData
{
    public class InitialHostDbBuilder
    {
        private readonly FutureAppDbContext _context;

        public InitialHostDbBuilder(FutureAppDbContext context)
        {
            this._context = context;
        }

        public void Create()
        {
            this._context.DisableAllFilters();

            new DefaultEditionsCreator(this._context).Create();
            new DefaultLanguagesCreator(this._context).Create();
            new DefaultPermissionDefinitionCreator(this._context).Create();
            new DefaultMenusCreator(this._context).Create();
            new HostRoleAndUserCreator(this._context).Create();
            new DefaultSettingsCreator(this._context).Create();
        }
    }
}
